# 用于输出genre.csv
import pandas as pd
from utils import (
  log_message
)
def create_all_csv():
  keyword_data = pd.read_csv('../data/llm-pretrain-data/keywords.csv')
  genre_data = pd.read_csv('../data/llm-pretrain-data/genres.csv')
  info_data = pd.read_csv('../data/llm-pretrain-data/infos.csv')
  # 合并数据框，基于movieId列
  merged_data = pd.merge(keyword_data, genre_data, on='movieId')
  result = pd.merge(merged_data, info_data, on='movieId')
  result.to_csv('../data/llm-pretrain-data/all.csv', index=False)
  log_message("数据生成完毕")

create_all_csv()